package com.topc.others.service.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.validation.constraints.NotNull;
import java.util.List;

@FeignClient(name = "topc-participant-api")
public interface CourseClient {
    @PostMapping("/participant/open/course/get-user-course-id")
    List<Long> getCourseListByNumber(@RequestParam("userNumber")@NotNull String userNumber);

    @PostMapping("/participant/open/course/search-user-count")
    int searchUserCount(@RequestParam("courseId")@NotNull Long courseId, @RequestParam("userNumber")@NotNull String userNumber);

    @PostMapping("/participant/open/user/search-name-list")
    List<String> searchRankingNameList(@RequestParam("userNumbers")List<String> userNumbers);
}
